package net.xdclass.vo;


import java.math.BigDecimal;

/**
 * @Classname CartItemVo
 * @Description TODO
 * @Date 2022/4/27 14:38
 * @Created by sunhao
 */
public class CartItemVo {

  /**
   * 商品Id
   */
  private Long productId;


  /**
   * 购买数量
   */
  private Integer buyNum;


  /**
   * 标题
   */
  private String title;

  /**
   * 封面图
   */
  private String coverImg;


  /**
   * 单价
   */
  private BigDecimal amount;

  /**
   * 总价
   */
  private BigDecimal totalAmount;

  public Long getProductId() {
    return productId;
  }

  public void setProductId(Long productId) {
    this.productId = productId;
  }

  public Integer getBuyNum() {
    return buyNum;
  }

  public void setBuyNum(Integer buyNum) {
    this.buyNum = buyNum;
  }

  public String getTitle() {
    return title;
  }

  public void setTitle(String title) {
    this.title = title;
  }

  public String getCoverImg() {
    return coverImg;
  }

  public void setCoverImg(String coverImg) {
    this.coverImg = coverImg;
  }

  public BigDecimal getAmount() {
    return amount;
  }

  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }

  public BigDecimal getTotalAmount() {
    return amount.multiply(new BigDecimal(buyNum));
  }

  public void setTotalAmount(BigDecimal totalAmount) {
    this.totalAmount = totalAmount;
  }
}
